/*
 * File Name:               SingletonTemplate.cs
 *
 * Description:             单例模式的简单实现
 * Author:                  lisiyu
 * Create Date:             2016/10/16
 */

public class SingletonTemplate<T> where T : class, new()
{
    private static T mSingleton;

    public static T Singleton
    {
        get
        {
            if (mSingleton == null)
                mSingleton = new T();
            return mSingleton;
        }
    }
}